<template>
  <div class="qrcode">
    <w-nav-bar
      title="二维码生成"/>
    <group>
      <x-textarea
        placeholder="请输入"
        v-model="codeStr"/>
    </group>
    <group>
      <qrcode
        v-if="codeStr"
        :size="width"
        :value="codeStr"/>
    </group>
  </div>
</template>

<script>
import { XTextarea, Group, Qrcode } from 'vux'
export default {
  name: 'ToolQrcodeIndex',
  components: {
    XTextarea,
    Group,
    Qrcode
  },
  data () {
    return {
      codeStr: '',
      width: document.documentElement.clientWidth
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
